<template>
<div class="container-bbb">
    B组件：<button @click="fn">传给A值</button>
</div>
</template>

<script>
import eventBus from '@/eventBus'
export default {
data(){
    return{
str:'我是B组件的数据'
    }
},
methods: {
    fn () {
      eventBus.$emit('b2a', this.str)
    }
  }

}
</script>
<style scoped>
</style>